package sol.leetcode;

/**
 * Power of Two
 * Created by lkk on 2016/8/28.
 */
public class Issue231 {
    public static boolean isPowerOfTwo(int n) {
        return n > 0 && (n & (n - 1)) == 0;
    }

    public static void main(String[] args) {
        System.out.println(isPowerOfTwo(1));
        System.out.println(isPowerOfTwo(3));
    }
}
